/* 组件样式 */

/* 模型指标 */
.model-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.metric-item {
    display: flex;
    align-items: center;
    padding: 18px;
    background: #fff;
    border-radius: var(--radius);
    min-width: 220px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.metric-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: rgba(52, 152, 219, 0.2);
}

.metric-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: white;
    font-size: 1.4rem;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.2);
}

.metric-name {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 5px;
}

.metric-value {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary-dark);
    letter-spacing: -0.5px;
}

/* 场景网格 */
.scene-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.scene-item {
    display: flex;
    padding: 20px;
    background: #fff;
    border-radius: var(--radius);
    transition: all 0.3s;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.scene-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: rgba(52, 152, 219, 0.2);
}

.scene-icon {
    width: 56px;
    height: 56px;
    background: var(--primary-gradient);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 18px;
    color: white;
    font-size: 1.6rem;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.2);
}

.scene-title {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--primary-dark);
    font-size: 1.1rem;
}

.scene-desc {
    font-size: 0.95rem;
    color: var(--gray);
    line-height: 1.6;
}

/* 架构图 */
.architecture-diagram {
    margin: 25px 0;
    text-align: center;
}

.architecture-diagram img {
    max-width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.architecture-diagram img:hover {
    transform: scale(1.02);
}

/* 技术栈表格 */
.tech-stack {
    margin-bottom: 24px;
    overflow-x: auto;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 1;
}

.btn:hover::after {
    transform: translateY(0);
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.2);
}

.btn-primary:hover {
    box-shadow: 0 6px 15px rgba(52, 152, 219, 0.3);
    transform: translateY(-3px);
}

.btn-secondary {
    background-color: #f8f9fa;
    color: var(--primary);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
    background-color: #e9ecef;
    transform: translateY(-2px);
}

.btn-icon {
    margin-right: 8px;
    font-size: 16px;
    position: relative;
    z-index: 2;
}

/* 输入控件 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--gray-dark);
}

.form-control {
    width: 100%;
    height: 44px;
    padding: 10px 15px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-sm);
    transition: all 0.3s;
    font-size: 14px;
    background-color: #fff;
}

.form-control:focus {
    border-color: var(--primary-light);
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* 卡片网格 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.card {
    background-color: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.card-header {
    padding: 18px 20px;
    background: var(--primary-gradient);
    color: white;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.card-subtitle {
    font-size: 13px;
    opacity: 0.9;
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 15px 20px;
    background-color: rgba(0, 0, 0, 0.02);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: flex-end;
}

/* 徽章 */
.badge-primary {
    display: inline-block;
    padding: 4px 10px;
    background-color: var(--primary);
    color: white;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(52, 152, 219, 0.2);
}

.badge-success {
    background-color: var(--success);
    box-shadow: 0 2px 5px rgba(46, 204, 113, 0.2);
}

.badge-warning {
    background-color: var(--warning);
    box-shadow: 0 2px 5px rgba(243, 156, 18, 0.2);
}

.badge-danger {
    background-color: var(--danger);
    box-shadow: 0 2px 5px rgba(231, 76, 60, 0.2);
}

/* 警告框 */
.alert {
    padding: 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    border-left: 4px solid;
}

.alert-icon {
    margin-right: 15px;
    font-size: 20px;
}

.alert-info {
    background-color: rgba(52, 152, 219, 0.1);
    border-color: var(--primary);
    color: var(--primary-dark);
}

.alert-success {
    background-color: rgba(46, 204, 113, 0.1);
    border-color: var(--success);
    color: #27ae60;
}

.alert-warning {
    background-color: rgba(243, 156, 18, 0.1);
    border-color: var(--warning);
    color: #e67e22;
}

.alert-danger {
    background-color: rgba(231, 76, 60, 0.1);
    border-color: var(--danger);
    color: #c0392b;
}

/* 进度条 */
.progress {
    height: 10px;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-bar {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 5px;
    transition: width 0.5s ease;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--gray);
    margin-bottom: 20px;
}

/* 标签 */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--primary);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s;
}

.tag:hover {
    background-color: rgba(52, 152, 219, 0.2);
    transform: translateY(-2px);
}

.tag-icon {
    margin-right: 5px;
    font-size: 14px;
}

/* 加载动画 */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(52, 152, 219, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 工具提示 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip-text {
    visibility: hidden;
    width: 120px;
    background-color: rgba(44, 62, 80, 0.9);
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* 数据盒子 */
.data-box {
    padding: 20px;
    background-color: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: all 0.3s;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.data-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.data-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 5px;
}

.data-label {
    font-size: 14px;
    color: var(--gray);
}

.data-trend {
    display: inline-flex;
    align-items: center;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 500;
}

.trend-up {
    color: var(--success);
}

.trend-down {
    color: var(--danger);
}

/* 特征重要性条 */
.feature-importance {
    margin: 20px 0;
}

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.feature-name {
    width: 180px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-dark);
}

.feature-bar-container {
    flex: 1;
    height: 12px;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    overflow: hidden;
    margin: 0 15px;
}

.feature-bar {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 6px;
    transition: width 0.8s ease;
}

.feature-value {
    width: 60px;
    text-align: right;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-dark);
}

/* 流程图 */
.flow-diagram {
    margin: 30px 0;
    padding: 20px;
    background-color: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.flow-title {
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-dark);
}

.flow-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin: 0 auto;
    max-width: 900px;
}

.flow-steps::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 50px;
    right: 50px;
    height: 3px;
    background: linear-gradient(to right, rgba(52, 152, 219, 0.3), rgba(52, 152, 219, 0.7));
    z-index: 1;
}

.flow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    width: 120px;
}

.flow-step-circle {
    width: 50px;
    height: 50px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 15px;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
    position: relative;
    transition: all 0.3s;
}

.flow-step:hover .flow-step-circle {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.4);
}

.flow-step-title {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--primary-dark);
    text-align: center;
    font-size: 15px;
}

.flow-step-desc {
    font-size: 13px;
    color: var(--gray);
    text-align: center;
    line-height: 1.5;
}

/* 表格样式 */
.performance-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius);
    overflow: hidden;
}

.performance-table th, .performance-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.performance-table th {
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--primary-dark);
    font-weight: 600;
    white-space: nowrap;
}

.performance-table tr:hover {
    background-color: rgba(52, 152, 219, 0.03);
}

/* 折叠面板 */
.collapsible {
    margin-bottom: 15px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--radius);
    overflow: hidden;
    background-color: #fff;
    box-shadow: var(--shadow-sm);
}

.collapsible-trigger {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.02);
    cursor: pointer;
    font-weight: 500;
    color: var(--gray-dark);
    transition: all 0.3s;
}

.collapsible-trigger:hover {
    background-color: rgba(52, 152, 219, 0.05);
}

.collapsible-trigger i.fa-chevron-down {
    margin-left: auto;
    transition: transform 0.3s;
}

.collapsible.open .collapsible-trigger i.fa-chevron-down {
    transform: rotate(180deg);
}

.collapsible-content {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.collapsible.open .collapsible-content {
    padding: 20px;
    max-height: 500px;
}

@media (max-width: 768px) {
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .model-metrics {
        flex-direction: column;
    }
    
    .metric-item {
        width: 100%;
    }
    
    .flow-steps {
        flex-direction: column;
        align-items: center;
    }
    
    .flow-steps::before {
        top: 50px;
        bottom: 50px;
        left: 25px;
        right: auto;
        width: 3px;
        height: auto;
        background: linear-gradient(to bottom, rgba(52, 152, 219, 0.3), rgba(52, 152, 219, 0.7));
    }
    
    .flow-step {
        flex-direction: row;
        width: 100%;
        margin-bottom: 20px;
        align-items: flex-start;
    }
    
    .flow-step-circle {
        margin-right: 15px;
        margin-bottom: 0;
    }
    
    .flow-step-content {
        text-align: left;
    }
    
    .flow-step-title, .flow-step-desc {
        text-align: left;
    }
    
    .feature-name {
        width: 120px;
    }
}

.highlight {
    animation: highlight-pulse 2s infinite;
}

@keyframes highlight-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(52, 152, 219, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0);
    }
} 